﻿@{
    ViewData["Title"] = "PostItemView";
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>layui在线调试</title>
    <link href="~/layui/css/layui.css" rel="stylesheet" />
</head>
<body>
    <form class="layui-form" action="/Owner/CreateOwner" lay-filter="example">
        <div class="layui-form-item">
            <div style="float:left">
                <label class="layui-form-label">货主姓名：</label>
                <div class="layui-input-block">
                    <input type="text" name="Name" id="Name" lay-verify="required" autocomplete="off" placeholder="货主姓名" class="layui-input">
                </div>
            </div>
             <div style="float:left">
                <label class="layui-form-label">手机号：</label>
                <div class="layui-input-block">
                    <input type="text" name="Phone" id="Phone" lay-verify="required" autocomplete="off" placeholder="手机号" class="layui-input">
                </div>
            </div>
         </div>
        <div class="layui-form-item">
             <div style="float:left">
                <label class="layui-form-label">单位名称：</label>
                <div class="layui-input-block">
                    <input type="text" name="FieldName" id="FieldName" lay-verify="required" autocomplete="off" placeholder="单位名称" class="layui-input">
                </div>
            </div>
             <div style="float:left">
                <label class="layui-form-label">联系地址：</label>
                <div class="layui-input-block">
                    <input type="text" name="Oaddress" id="Oaddress" lay-verify="required" autocomplete="off" placeholder="联系地址" class="layui-input">
                </div>
            </div>
         </div>
        <div class="layui-form-item">
              <div style="float:left">
                <label class="layui-form-label">驾驶证有效日期：</label>
                <div class="layui-input-block">
                    <input type="date" name="ODrivinglicense" id="ODrivinglicense" lay-verify="required" autocomplete="off" placeholder="驾驶证有效日期" class="layui-input">
                </div>
            </div>
             <div style="float:left">
                <label class="layui-form-label">备注：</label>
                <div class="layui-input-block">
                    <input type="text" name="Oremark" id="Oremark" lay-verify="required" autocomplete="off" placeholder="备注" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                <a class="layui-btn layui-btn-primary" onclick="location.href='/Owner/Index'">返回</a>
            </div>
        </div>
    </form>
    <script src="~/libs/jquery/jquery.js"></script>
    <script src="~/layui/layui.js" charset="utf-8"></script>

    <script>
        layui.use(['form', 'layedit', 'laydate','upload'], function(){
          var form = layui.form
          ,layer = layui.layer
          ,layedit = layui.layedit
          ,laydate = layui.laydate
          ,upload = layui.upload
          ,element = layui.element;

          //日期
          laydate.render({
            elem: '#SigningDate'
          });
          form.render();
          //监听提交
          form.on('submit(demo1)', function(data){
          });
          //指定允许上传的文件类型
          upload.render({
            elem: '#test3'
            ,url: '/CarryContract/FileUpload' //此处配置你自己的上传接口即可
            ,accept: 'file' //普通文件
            ,done: function(res){
              layer.msg('上传成功');
              console.log(res);
            }
          });
        });
    </script>
</body>
</html>


